#ifndef MainMenuState_H
#define MainMenuState_H

#include <Ogre.h>
#include "GameState.h"

class MainMenuState : public GameState
{
public:
	void enter();
	void exit();

	void pause();
	void resume();

	
	bool setup();	
	void chooseSceneManager(void);
	void createCamera(void);	
	void createScene(void);
	void destroyScene(void);
	void createViewports(void);
	void setupResources(void);	
	bool processUnbufferedKeyInput(const FrameEvent& evt);
	bool processUnbufferedMouseInput(const FrameEvent& evt);
	void moveCamera();	
	
	
	

	
	bool frameStarted(GameManager* game, const Ogre::FrameEvent& evt);
	bool frameEnded(GameManager* game, const Ogre::FrameEvent& evt);
	
    bool mouseMoved(GameManager* game, const OIS::MouseEvent &e);
	bool mousePressed(GameManager* game, const OIS::MouseEvent &e, OIS::MouseButtonID id );
    bool mouseReleased(GameManager* game, const OIS::MouseEvent &e, OIS::MouseButtonID id);

    bool keyPressed(GameManager* game, const OIS::KeyEvent &e);
    bool keyReleased(GameManager* game, const OIS::KeyEvent &e);	

	static MainMenuState* getInstance() { return &mMainMenuState; }

protected:
	MainMenuState() { }

	Ogre::Root* mRoot;
	Ogre::RenderWindow* mWindow;
	Ogre::Camera* mCamera;
	Ogre::SceneManager* mSceneMgr;
	Ogre::Viewport* mViewport;

	Ogre::String mDebugText;
	Ogre::Radian mRotX, mRotY;
	Ogre::Vector3 mTranslateVector;

	Ogre::SceneNode* mainMenuAxisNode;
	Ogre::Real next, preview;
	int SelectMenuValue;


private:
	static MainMenuState mMainMenuState;	
	
	int soundMainMenuTurn;


	SoundManager* mSound;

	int Bgm, Wheel;
	int BgmCh, WheelCh;
	
	bool mContinue;
};

#endif
